import { defineStore } from 'pinia';


export const useTestStore = defineStore({
  id: 'test',
  state: () => ({
    s_data: '',
  }),
  getters: {
    data(state) {
      return state.s_data;
    },
  },
  actions: {
    // 更新状态
    setData(data) {
      this.s_data = data;
    },
  },
  //持久化储存
  persist: true
})